/* 生日祝福页面样式 */
@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-20px); }
}

@keyframes confetti-fall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #fff0f5, #ffe4e1);
    color: #333;
    text-align: center;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 100%;
    padding: 20px;
    padding-top: 60px; /* 为音乐控制留出空间 */
    animation: fadeIn 1.5s ease-in-out;
}

h1 {
    color: #ff69b4;
    margin-top: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: slideIn 1s ease-out;
}

.name {
    font-size: 2.8rem;
    font-weight: bold;
    color: #ff1493;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: slideIn 1.2s ease-out;
}

.message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 20px auto;
    max-width: 80%;
    animation: fadeIn 2s ease-in-out;
}

.heart {
    font-size: 5rem;
    color: #ff1493;
    animation: heartbeat 1.5s infinite;
    text-shadow: 0 0 10px rgba(255,20,147,0.3);
}

.cake {
    font-size: 5rem;
    margin: 20px 0;
    animation: slideIn 1.5s ease-out;
    text-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.balloon {
    font-size: 3rem;
    margin: 0 10px;
    animation: float 3s infinite alternate;
    display: inline-block;
    text-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.balloon:nth-child(2n) {
    animation-delay: 0.5s;
}

.balloon:nth-child(3n) {
    animation-delay: 1s;
}

.balloons {
    margin: 20px 0;
}

.photo-frame {
    max-width: 90%;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 1.8s ease-out;
}

.photo-frame img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.photo-frame img:hover {
    transform: scale(1.02);
}

/* 美好回忆标题样式 */
.photo-memories {
    margin: 20px auto;
    animation: slideIn 1.8s ease-out;
}

.photo-memories h2 {
    color: #ff69b4;
    font-size: 2rem;
    margin: 15px 0;
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.photo-memories h2:before,
.photo-memories h2:after {
    content: "❤️";
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.photo-memories h2:before {
    left: -30px;
}

.photo-memories h2:after {
    right: -30px;
}

.wishes {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    margin: 30px auto;
    max-width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideIn 2s ease-out;
}

.wishes h2 {
    color: #ff69b4;
    margin-bottom: 15px;
}

.wishes p {
    margin: 10px 0;
}

.footer {
    margin-top: 40px;
    font-size: 1rem;
    color: #666;
    animation: fadeIn 2.5s ease-in-out;
}

/* 新的音乐控制样式 - 右上角固定位置 */
.music-control {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 100;
    animation: fadeIn 2.2s ease-in-out;
}

.music-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 105, 180, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.music-icon.playing {
    animation: rotate 3s linear infinite;
}

.music-icon:hover {
    transform: scale(1.1);
    background-color: rgba(255, 20, 147, 0.9);
}

.music-icon span {
    font-size: 20px;
    color: white;
}

/* 隐藏原始音频控件 */
.music-control audio {
    display: none;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: confetti-fall 5s linear infinite;
    z-index: -1;
}

/* 照片轮播新样式 */
.photo-carousel {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px auto;
    perspective: 1000px;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 1s ease;
    opacity: 0;
    transform: scale(0.8) translateY(30px);
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 10;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    margin: 15px auto;
}

.carousel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 105, 180, 0.3);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #ff1493;
    transform: scale(1.2);
}

/* 互动元素 */
.interactive-element {
    position: absolute;
    font-size: 24px;
    animation: float 3s infinite alternate;
    cursor: pointer;
    user-select: none;
    z-index: 5;
}

.interactive-element:hover {
    animation: pulse 0.5s infinite;
}

/* 响应式设计 - 增强手机适配 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin-top: 20px;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .message {
        font-size: 1rem;
        max-width: 95%;
    }
    
    .heart, .cake {
        font-size: 3.5rem;
    }
    
    .balloon {
        font-size: 2rem;
    }
    
    .photo-memories h2 {
        font-size: 1.5rem;
    }
    
    .photo-carousel {
        width: 250px;
        height: 250px;
    }
    
    .wishes {
        padding: 15px;
    }
    
    .countdown {
        font-size: 1.2rem;
    }
    
    .countdown span {
        padding: 3px 8px;
    }
    
    .btn {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* 按钮样式 */
.btn {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    margin: 15px 0;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(255,105,180,0.3);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255,105,180,0.4);
}

.btn:active {
    transform: translateY(1px);
}

/* 隐藏原始图片墙，使用新的轮播 */
.photo-gallery {
    display: none;
}

/* 倒计时样式 */
.countdown {
    margin: 20px auto;
    font-size: 1.5rem;
    color: #ff1493;
    font-weight: bold;
    animation: fadeIn 2s ease-in-out;
}

.countdown span {
    display: inline-block;
    margin: 0 5px;
    background-color: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 点击效果 */
.tap-effect {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,105,180,0.8) 0%, rgba(255,105,180,0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: tap-animation 0.5s forwards;
    z-index: 999;
}

@keyframes tap-animation {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3);
    }
} 